import { _decorator, Component, Node, view, ResolutionPolicy, director } from 'cc';
import GameManager from './tool/GameManager';
const { ccclass, property } = _decorator;

@ccclass('Adaptation')
export class Adaptation extends Component {

    start() {
        console.log("Adaptation start");
        if (GameManager.Instance.GetScreenOrientation()==0) {
            view.setDesignResolutionSize(960, 640, ResolutionPolicy.FIXED_HEIGHT);
            director.loadScene("homeW");
        }else
        {
            view.setDesignResolutionSize(640, 960, ResolutionPolicy.FIXED_WIDTH);
            director.loadScene("homeH");
        }
    }


}

